home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / network / info-sys / www / tkhtml-2.3 / tkhtml-2 / tkHTML-2.3 / tix / Tix.tcl < prev    next >
Encoding:
Text File  |  1995-02-12  |  1.8 KB  |  68 lines

  1. #----------------------------------------------------------------------
  2. # The Tix Package stub file. It loads in the Tix Package.
  3. #
  4. #----------------------------------------------------------------------
  5. proc tixInit {args} {
  6.     # The default options
  7.  
  8.     set option(-scheme)   TK
  9.     set option(-fontset)  TK
  10.     set option(-binding)  TK
  11.     set option(-libdir)   /usr/local/lib/tix
  12.  
  13.     set validOptions {-scheme -binding -libdir -fontset}
  14.  
  15.     tixHandleOptions option $validOptions $args
  16.  
  17.     #-------------------------------
  18.     # Initialization of the package
  19.     #-------------------------------
  20.     global TIX_SOURCE_DIR auto_path
  21.  
  22.     set TIX_SOURCE_DIR $option(-libdir)
  23.  
  24.     lappend auto_path $TIX_SOURCE_DIR/schemes
  25.     lappend auto_path $TIX_SOURCE_DIR/bindings
  26.  
  27.     #-----------------------------------
  28.     # Initialization of options database
  29.     #-----------------------------------
  30.     if {$option(-fontset) == {}} {
  31.     set option(-fontset) TK
  32.     }
  33.     if {$option(-scheme) == {}} {
  34.     set option(-scheme) TK
  35.     }
  36.  
  37.     # Load the fontset
  38.     #
  39.     if [auto_load tixSetFontset::$option(-fontset)] {
  40.     tixSetFontset::$option(-fontset)
  41.     } else {
  42.     return -code error "unknown fontset option \"$option(-fontset)\""
  43.     }
  44.  
  45.     # Load the bindings
  46.     #
  47.     if [auto_load tixSetColorScheme::$option(-scheme)] {
  48.     tixSetColorScheme::$option(-scheme)
  49.     } else {
  50.     return -code error "unknown color scheme option \"$option(-scheme)\""
  51.     }
  52.  
  53.     tixInitOptionDatabase
  54.  
  55.     #----------------------------------
  56.     # Initialization of binding package
  57.     #----------------------------------
  58.     if {$option(-binding) == {}} {
  59.     set option(-binding) TK
  60.     }
  61.  
  62.     if [auto_load tixSetBinding::$option(-binding)] {
  63.     tixSetBinding::$option(-binding)
  64.     } else {
  65.     return -code error "unknown binding option \"$option(-binding)\""
  66.     }
  67. }
  68.